#ifndef SEKAI_TRACK_H
#define SEKAI_TRACK_H

#include <map>
#include <sekai/common.h>
#include <string>
#include <vector>

struct Pitch {
  float pos;
  float voiced;
  float f0;
};

class Track {
private:
  std::map<std::string, std::string> headerMap;
  std::vector<Pitch> pitchTrack;
  static Pitch pitchEmpty;

public:
  bool readFromFile(std::string fileName);
  inline Pitch getPitch(unsigned int i) {
    if (unlikely(i > pitchTrack.size()))
      return pitchEmpty;
    else
      return pitchTrack[i];
  }
  inline int getPitchCount() { return pitchTrack.size(); }
};

#endif
